package com.bilubi.reggie.reggie.mapper;

import com.bilubi.reggie.reggie.annotation.AutoFill;
import com.bilubi.reggie.reggie.bean.Category;
import com.bilubi.reggie.reggie.enums.OperateType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface CategoryMapper {
    int deleteByPrimaryKey(Long id);

    @AutoFill(OperateType.INSERT)
    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Long id);

    @AutoFill(OperateType.UPDATE)
    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    List<Category> selectAll();

    List<Category> selectAllByType(Integer type);
}